package com.bw.announcement.announcement

import com.bw.announcement.entity.AnnouncementData
import com.bw.common.http.NetUtils.httpRequest
import javax.inject.Inject

class AnnouncementRepo  @Inject constructor(val announcementApiService: AnnouncementApiService) {

    suspend fun getAnnouncements(page:Int,size:Int):List<AnnouncementData>?{
        val result = httpRequest { announcementApiService.getAnnouncements(page, size) }
        if (result.code == 200){
            return result.data
        }
        return null
    }

}